package demo7;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        int n;
        Scanner sr=new Scanner(System.in);
        n=sr.nextInt();
        int sumj=0;
        int sumo=0;
        for (int i = 0; i < n; i++) {
            int a=sr.nextInt();
            if(jo(a)==1){
                sumo+=a;
            }else{
                sumj+=a;
            }
        }
        System.out.println("奇数和="+sumj+", "+"偶数和="+sumo);
    }
    public static int jo(int n){
        if(n%2==0){
            return 1;
        }
        return -1;
    }
}
